package com.qf.spring.servlet;

import com.qf.spring.pojo.User;
import com.qf.spring.service.UserService;

/**
 * @author 王博康
 * @version 1.0
 * @project 01_spring
 * @description: TODO
 * @date 2022/3/3 21:36 星期四
 */
public class UserServlet {
    //声明依赖
    private UserService userService;
    //提供设置依赖的方法
    public void setUserService(UserService userService) {
        this.userService = userService;
    }
    //调用依赖
    public User getUser() {
        return userService.getUser();
    }
}
